home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(this._xscale > _global.psize - 10)
- {
- this._xscale -= 10;
- this._yscale -= 10;
- }
- if(this._xscale < _global.psize + 10)
- {
- this._xscale += 10;
- this._yscale += 10;
- }
- _root.nightsky._rotation += _global.boost / 4;
- _global.vincy -= 1;
- if(_global.vincy == 60)
- {
- fx11 = new Sound(zoop1);
- fx11.attachSound("DITDAT");
- fx11.start(0,1);
- }
- if(_global.vincy == 20)
- {
- fx11 = new Sound(zoop1);
- fx11.attachSound("DITDAT");
- fx11.start(0,1);
- }
- if(_global.vincy == 0)
- {
- this.gotoAndStop(1);
- _global.psize = 100;
- maxspeed = 14;
- }
- if(_global.timeday == 0)
- {
- skyit++;
- }
- if(skyit == 1000)
- {
- _root.sky.gotoAndPlay("night");
- }
- if(skyit == 5000)
- {
- _root.sky.gotoAndPlay("day");
- skyit = 0;
- }
- _root.sky._y = _root.depth._y + 60 - (_root.depth._y - this._y) / 10;
- _root.backstuff1._y = _root.depth._y;
- _root.backstuff2._y = _root.backstuff1._y;
- _root.topdepth1._y = _root.depth._y;
- _root.topdepth2._y = _root.depth._y;
- _root.topdepth3._y = _root.depth._y;
- if(die == 1)
- {
- timey += 1;
- if(_global.fly == 1)
- {
- if(this._rotation < 90)
- {
- if(this._rotation > 0)
- {
- if(this._currentframe != 3)
- {
- this.gotoAndStop(3);
- }
- }
- }
- if(this._rotation > 90)
- {
- if(this._rotation < 180)
- {
- if(this._currentframe != 4)
- {
- this.gotoAndStop(4);
- }
- }
- }
- if(this._rotation < 180)
- {
- if(this._rotation < -90)
- {
- if(this._currentframe != 4)
- {
- this.gotoAndStop(4);
- }
- }
- }
- flyer++;
- if(flyer == 400)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("clunk");
- fx1.stop("clunk");
- fx1.start(0,1);
- }
- if(flyer == 450)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("clunk");
- fx1.stop("clunk");
- fx1.start(0,1);
- }
- if(flyer == 500)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("clunk");
- fx1.stop("clunk");
- fx1.start(0,1);
- }
- if(flyer > 550)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("barf");
- fx1.stop("barf");
- fx1.start(0,1);
- _global.fly = 0;
- flyer = 0;
- this.gotoAndStop(1);
- _global.boost = 0;
- _root.tools.bar1.gotoAndStop(1);
- ms = new Sound(music);
- ms.attachSound("music1");
- ms.stop("music6");
- ms.start(0,999);
- i = 1;
- while(i <= 100)
- {
- _root["fishy" + i].die = 0;
- i++;
- }
- }
- if(this._y > _root.topdepth2._y)
- {
- ms = new Sound(music);
- ms.attachSound("music1");
- ms.stop("music6");
- ms.start(0,999);
- fx1 = new Sound(zoop);
- fx1.attachSound("barf");
- fx1.stop("barf");
- fx1.start(0,1);
- _global.fly = 0;
- flyer = 0;
- this.gotoAndStop(1);
- _global.boost = 0;
- }
- }
- else if(_global.fly == 3)
- {
- this.gotoAndStop(1);
- _global.fly = 1;
- }
- _root.topdepth1.swapDepths(10001);
- _root.topdepth2.swapDepths(10002);
- _root.topdepth3.swapDepths(10003);
- _root.tools.instblock._alpha += 3;
- if(_root.tools.score.text < _global.scoreit)
- {
- _root.tools.score.text = _root.tools.score.text + 1;
- }
- if(_root.tools.score.text < _global.scoreit - 10)
- {
- _root.tools.score.text = _root.tools.score.text * 1 + 10;
- }
- _root.topdepth1._x += _global.xgo;
- _root.topdepth2._x += _global.xgo;
- _root.topdepth3._x += _global.xgo;
- if(_root.topdepth3._x > 886.4)
- {
- _root.topdepth3.gotoAndStop(_root.topdepth3._currentframe + 1);
- _root.topdepth3._x = _root.topdepth1._x - 704.2;
- }
- if(_root.topdepth2._x > 886.4)
- {
- _root.topdepth2.gotoAndStop(_root.topdepth2._currentframe + 1);
- _root.topdepth2._x = _root.topdepth3._x - 704.2;
- }
- if(_root.topdepth1._x > 886.4)
- {
- _root.topdepth1.gotoAndStop(_root.topdepth1._currentframe + 1);
- _root.topdepth1._x = _root.topdepth2._x - 704.2;
- }
- if(_root.topdepth3._x < -1035.4)
- {
- _root.topdepth3.gotoAndStop(_root.topdepth3._currentframe - 1);
- _root.topdepth3._x = _root.topdepth2._x + 704.2;
- }
- if(_root.topdepth2._x < -1035.4)
- {
- _root.topdepth2.gotoAndStop(_root.topdepth2._currentframe - 1);
- _root.topdepth2._x = _root.topdepth1._x + 704.2;
- }
- if(_root.topdepth1._x < -1035.4)
- {
- _root.topdepth1.gotoAndStop(_root.topdepth1._currentframe - 1);
- _root.topdepth1._x = _root.topdepth3._x + 704.2;
- }
- if(_global.boost > 1)
- {
- _global.boost -= _global.boost / 1000;
- _root.tools.bar1.gotoAndStop(Math.round(_global.boost + 1));
- }
- countgo--;
- buttoner++;
- _root.player.swapDepths(10000);
- _root.playersize.text = psize;
- if(speed == 0)
- {
- this.tail1.gotoAndStop(1);
- }
- else
- {
- this.tail1.play();
- }
- if(Key.isDown(37))
- {
- this._rotation -= speed / 3 + _global.rotspeed1;
- }
- else
- {
- _global.goleft = 0;
- }
- if(Key.isDown(39))
- {
- this._rotation += speed / 3 + _global.rotspeed1;
- }
- else
- {
- _global.goright = 0;
- }
- countit5++;
- if(Key.isDown(32))
- {
- if(countit5 > 40)
- {
- if(_global.goballs > 0)
- {
- countit5 = 0;
- if(_global.goballs == 1)
- {
- _root.player.ongoball1.gotoAndPlay(22);
- }
- if(_global.goballs == 2)
- {
- _root.player.ongoball2.gotoAndPlay(22);
- }
- _global.goballs -= 1;
- if(countgo < 0)
- {
- countgo = 30;
- _root.zoom.gotoAndPlay(1);
- _root.zoom._x = this._x;
- _root.zoom._y = this._y;
- _root.zoom._rotation = this._rotation;
- fx1 = new Sound(zoop);
- fx1.attachSound("zoop");
- fx1.stop("zoop");
- fx1.start(0,1);
- if(this._y > _root.depth._y - 20)
- {
- if(speed < maxspeed * 1 + 1)
- {
- speed = 22;
- }
- buttoner = 0;
- }
- }
- }
- }
- }
- if(Key.isDown(38))
- {
- if(_global.fly == 0)
- {
- if(this._y > _root.depth._y)
- {
- if(speed < maxspeed)
- {
- speed += 1;
- }
- }
- }
- else if(speed < maxspeed)
- {
- speed += 1;
- }
- }
- else if(speed > 0)
- {
- speed -= 1;
- }
- if(speed > 0)
- {
- speed -= 0.3;
- }
- hey = 1;
- if(_global.fly == 0)
- {
- if(this._y < _root.depth._y)
- {
- air += 0.4;
- if(this._rotation > 0)
- {
- if(this._rotation < 90)
- {
- this._rotation -= 3;
- }
- }
- if(this._rotation < 180)
- {
- if(this._rotation > 90)
- {
- this._rotation += 3;
- }
- }
- }
- else if(air > 0.5)
- {
- air -= 0.5;
- }
- }
- else
- {
- air = 0;
- }
- if(this._y < _root.depth._y + 15)
- {
- if(this._y > _root.depth._y - 15)
- {
- if(air > 3)
- {
- if(_root.splash._currentframe == 1)
- {
- _root.splash._x = this._x;
- }
- _root.splash.play();
- }
- }
- }
- if(this._y < _root.depth._y + 15)
- {
- if(this._y > _root.depth._y - 15)
- {
- if(air < 1)
- {
- if(_root.splashup._currentframe == 1)
- {
- _root.splashup._x = this._x;
- }
- _root.splashup.play();
- }
- }
- }
- _global.xgo = Math.cos(3.141592653589793 * this._rotation / 180) * speed;
- _global.ygo = Math.sin(3.141592653589793 * this._rotation / 180) * speed - air;
- onefish1++;
- if(onefish1 == 50)
- {
- onefish1 = 0;
- _global.fish = _global.fish + 1;
- duplicateMovieClip(_root.food1,"fishy" + _global.fish,16384 + (_global.fish + 8000));
- if(_global.fish > 100)
- {
- _global.fish = 1;
- }
- rotrandy = 90;
- rotrand = Math.round(Math.random() * (rotrandy - (- rotrandy))) - rotrandy;
- speedrand = Math.round(Math.random() * 8) + 3;
- leftright = Math.round(Math.random() * 1) + 1;
- firsttypecomp = 10;
- type = Math.round(Math.random() * (firsttypecomp - 1)) + 1;
- if(type < 5)
- {
- type = 1;
- }
- else
- {
- type -= 4;
- }
- if(leftright == 1)
- {
- xposy = 1500;
- }
- else
- {
- xposy = -800;
- }
- _root["fishy" + _global.fish]._x = xposy;
- _root["fishy" + _global.fish]._y = type * 200;
- _root["fishy" + _global.fish]._rotation -= 90 - rotrand;
- if(type == 1)
- {
- typespeed = speedrand;
- turnspeed = 5;
- }
- if(type == 2)
- {
- typespeed = speedrand;
- turnspeed = 5;
- }
- if(type == 3)
- {
- typespeed = speedrand / 3;
- turnspeed = 0.5;
- }
- if(type == 4)
- {
- typespeed = speedrand / 2;
- turnspeed = 3;
- }
- if(type == 5)
- {
- typespeed = speedrand;
- turnspeed = 3;
- }
- _root["fishy" + _global.fish].turnspeed = turnspeed;
- _root["fishy" + _global.fish].mespeed = typespeed - 1;
- mesizey = 30 + speedrand * 5;
- _root["fishy" + _global.fish].mesize = mesizey;
- _root["fishy" + _global.fish].fishtype = type;
- scoreworthy = mesizey / 2 / (type * 2) * 10;
- _root["fishy" + _global.fish].scoreworth = scoreworthy;
- _root["fishy" + _global.fish].die = 1;
- }
- onefish2++;
- if(onefish2 == 120)
- {
- onefish2 = 0;
- if(_global.fishe < 30)
- {
- _global.fishe = _global.fishe + 1;
- duplicateMovieClip(_root.enemy1,"fishye" + _global.fishe,16384 + (_global.fishe + 8200));
- rotrand = Math.round(Math.random() * 179) + 1;
- speedrand = Math.round(Math.random() * 3) + 7;
- leftright = Math.round(Math.random() * 1) + 1;
- firsttypecomp = 4;
- type = Math.round(Math.random() * (firsttypecomp + 4 - 1)) + 1;
- if(type < 4)
- {
- type = 1;
- }
- if(leftright == 1)
- {
- xposy = 2000;
- }
- else
- {
- xposy = -1300;
- }
- _root["fishye" + _global.fishe]._x = xposy;
- _root["fishye" + _global.fishe]._y = type * 200;
- _root["fishye" + _global.fishe]._rotation = rotrand;
- if(type == 1)
- {
- typespeed = speedrand;
- turnspeed = 7;
- }
- if(type == 2)
- {
- typespeed = speedrand;
- turnspeed = 5;
- }
- if(type == 3)
- {
- typespeed = speedrand / 3;
- turnspeed = 1;
- }
- if(type == 4)
- {
- typespeed = speedrand / 2;
- turnspeed = 3;
- }
- if(type == 5)
- {
- typespeed = speedrand / 4;
- turnspeed = 4;
- }
- _root["fishye" + _global.fishe].turnspeed = turnspeed;
- _root["fishye" + _global.fishe].mespeed = typespeed;
- _root["fishye" + _global.fishe].mesize = 160;
- _root["fishye" + _global.fishe].fishtype = 1;
- _root["fishye" + _global.fishe].die = 1;
- }
- }
- }
- else
- {
- restartcount++;
- if(restartcount > 60)
- {
- if(this._y > _root.depth._y - 400)
- {
- _global.ygo += 1;
- }
- else
- {
- _global.ygo /= 2;
- }
- }
- if(restartcount > 130)
- {
- if(restartcount == 140)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("Clunk");
- fx1.stop("Clunk");
- fx1.start(0,1);
- _root.finalscore.text = _global.scoreit;
- }
- boostor = 0;
- if(restartcount == 160)
- {
- if(_global.boost > 50)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("boingboing");
- fx1.stop("boingboing");
- fx1.start(0,1);
- booster = Math.round(_global.boost * 5);
- _root.finalscore.text += "\n\n + Fury Bonus " + booster;
- }
- else
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("Clunk");
- fx1.stop("Clunk");
- fx1.start(0,1);
- _root.finalscore.text += "\n\n ----- ";
- }
- }
- if(restartcount == 180)
- {
- if(timey > 100)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("boingboing");
- fx1.stop("boingboing");
- fx1.start(0,1);
- _root.finalscore.text += "\n + Time Bonus " + Math.round(timey / 100);
- }
- else
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("Clunk");
- fx1.stop("Clunk");
- fx1.start(0,1);
- _root.finalscore.text += "\n ----- ";
- }
- }
- if(restartcount == 200)
- {
- bonos = 0;
- yito = Math.floor(Math.random() * 20) + 1;
- goyy = 0;
- if(yito == 1)
- {
- bono = "+ random jig bonus ";
- bonos = 400;
- goyy = 1;
- }
- if(yito == 2)
- {
- bono = "+ super random bonus ";
- bonos = 1;
- goyy = 1;
- }
- if(yito == 3)
- {
- bono = "+ suprise bonus ";
- bonos = 200;
- goyy = 1;
- }
- if(yito == 4)
- {
- bono = "+ wooowee bonus ";
- bonos = 99;
- goyy = 1;
- }
- if(yito == 5)
- {
- bono = "+ slugface bonus ";
- bonos = 60;
- goyy = 1;
- }
- if(yito == 6)
- {
- bono = "+ extra bonus ";
- bonos = 20;
- goyy = 1;
- }
- if(yito == 7)
- {
- bono = "+ wow bonus ";
- bonos = 80;
- goyy = 1;
- }
- if(yito == 8)
- {
- bono = "+ slow bonus ";
- bonos = 3;
- goyy = 1;
- }
- if(yito == 9)
- {
- bono = "+ helpy bonus ";
- bonos = 6;
- goyy = 1;
- }
- if(yito == 10)
- {
- bono = "+ mental handicap ";
- bonos = 12;
- goyy = 1;
- }
- if(goyy == 1)
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("boingboing");
- fx1.stop("boingboing");
- fx1.start(0,1);
- _root.finalscore.text += "\n" + bono + bonos;
- }
- else
- {
- fx1 = new Sound(zoop);
- fx1.attachSound("Clunk");
- fx1.stop("Clunk");
- fx1.start(0,1);
- _root.finalscore.text += "\n ----- ";
- }
- }
- if(restartcount == 220)
- {
- scoreyy = _global.scoreit + Math.round(timey / 100) + Math.round(_global.boost * 5) + bonos;
- if(scoreyy < _global.pp3s)
- {
- fx1 = new Sound();
- fx1.attachSound("barf");
- fx1.stop("barf");
- fx1.start(0,1);
- _root.restartbox.resety.gotoAndPlay("barf");
- }
- else
- {
- ms = new Sound(music);
- ms.attachSound("music3");
- ms.stop("music2");
- ms.start(0,999);
- fx1.start(0,1);
- _root.restartbox.resety.gotoAndPlay("goody");
- }
- _root.finalscore.text += "\n\n" + scoreyy;
- if(scoreyy > _global.pp3s)
- {
- _root.slot1.text = "name";
- _root.slot1.selectable = 1;
- Selection.setFocus(_root.slot1);
- }
- _root.highlist.text = "1: " + _global.pp1n + " : " + _global.pp1s + "\n";
- _root.highlist.text += "2: " + _global.pp2n + " : " + _global.pp2s + "\n";
- _root.highlist.text += "3: " + _global.pp3n + " : " + _global.pp3s + "\n";
- }
- if(_root.restartbox._currentframe == 1)
- {
- _root.restartbox.play();
- ms = new Sound(music);
- ms.attachSound("music2");
- ms.stop("music1");
- ms.start(0,999);
- }
- if(scoreyy > _global.pp3s)
- {
- if(Key.isDown(13))
- {
- if(scoreyy > _global.pp3s)
- {
- if(scoreyy < _global.pp2s + 1)
- {
- _global.pp3n = _root.slot1.text;
- _global.pp3s = scoreyy;
- }
- }
- if(scoreyy > _global.pp2s)
- {
- if(scoreyy < _global.pp1s + 1)
- {
- _global.pp3n = _global.pp2n;
- _global.pp3s = _global.pp2s;
- _global.pp2n = _root.slot1.text;
- _global.pp2s = scoreyy;
- }
- }
- if(scoreyy > _global.pp1s)
- {
- _global.pp3n = _global.pp2n;
- _global.pp3s = _global.pp2s;
- _global.pp2n = _global.pp1n;
- _global.pp2s = _global.pp1s;
- _global.pp1n = _root.slot1.text;
- _global.pp1s = scoreyy;
- }
- scoreyy = 0;
- myLocalSO.data.pp1n = _global.pp1n;
- myLocalSO.data.pp1s = _global.pp1s;
- myLocalSO.data.pp2n = _global.pp2n;
- myLocalSO.data.pp2s = _global.pp2s;
- myLocalSO.data.pp3n = _global.pp3n;
- myLocalSO.data.pp3s = _global.pp3s;
- _root.highlist.text = "1: " + _global.pp1n + " - " + _global.pp1s + "\n";
- _root.highlist.text += "2: " + _global.pp2n + " - " + _global.pp2s + "\n";
- _root.highlist.text += "3: " + _global.pp3n + " - " + _global.pp3s + "\n";
- getUrl("FSCommand:save", "file.txt");
- _root.slot1.text = "";
- _root.slot1.selectable = 0;
- }
- }
- if(Key.isDown(38))
- {
- _root.finalscore.text = "";
- _root.highlist.text = "";
- _root.slot1.text = "";
- _root.restartbox.gotoAndPlay("endy");
- die = 1;
- _root.tools.powerup1.gotoAndStop(1);
- _global.boost = 0;
- _root.tools.bar1.gotoAndStop(1);
- ms = new Sound(music);
- ms.attachSound("music1");
- ms.stop("music2");
- ms.stop("music3");
- ms.start(0,999);
- musicy = 2;
- _global.goballs = 0;
- _root.player.ongoball1._alpha = 0;
- _root.player.ongoball2._alpha = 0;
- this.gotoAndStop(1);
- restartcount = 0;
- _root.tools.score.text = 0;
- _global.scoreit = 0;
- timey = 0;
- _global.fish = 0;
- _global.fishe = 0;
- i = 1;
- while(i <= 30)
- {
- _root["fishye" + i].die = 0;
- i++;
- }
- i = 1;
- while(i <= 100)
- {
- _root["fishy" + i].die = 0;
- i++;
- }
- }
- }
- }
- }
-